package com.yuyue.springFramework.note11.entity.custom3;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 用户注册发送邮件监听器
 */
@Component
public class UserRegisterSendMailEventListener implements ApplicationListener<UserRegisterSendMailEvent> {
    @Override
    public void onApplicationEvent(UserRegisterSendMailEvent event) {
        System.out.println(String.format("【%S】发送邮件成功", event.userName));
    }
}
